<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="/tags" prefix="date" %>
<%@ include file="../inc/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <meta name="format-detection" content="telephone=no">
    <meta charset="UTF-8">
    <meta name="description" content="Violate Responsive Admin Template">
    <meta name="keywords" content="Super Admin, Admin, Template, Bootstrap">
    <title>Super Admin Responsive Template</title>
    <!-- CSS -->
    <%@ include file="../inc/new/css.jsp" %>
</head>
<body id="skin-cloth">
<%@ include file="../inc/new/header.jsp" %>
<div class="clearfix"></div>
<section id="main" class="p-relative" role="main">
    <input type="hidden" id="mian_module" value="用户管理">
    <input type="hidden" id="child_module" value="用户审核列表">
    <%@ include file="../inc/new/menu.jsp" %>
    <section id="content" class="container">
        <!-- Breadcrumb -->
        <ol class="breadcrumb hidden-xs">
            <li><a href="javascript:history.go(-1);" title="返回"><span class="icon">&#61771;</span></a></li>
        </ol>
        <h1 class="page-title">用户审核信息</h1>
        <div class="block-area">
            <c:if test="${userCheck.status == 0}">
                <button class="btn btn-alt m-r-5" id="checkYes" onclick="changeStatus(${userCheck.id},1)">审核通过</button>
                <button class="btn btn-alt m-r-5" id="checkNo" onclick="changeStatus(${userCheck.id},2)">审核失败</button>
            </c:if>
            <div class="p-10" style="height:520px">
                <div class="col-md-6 m-b-15" style="margin-top: 10px;">
                    <label>姓名:</label>
                    <input type="text" value="${userCheck.userName}" class="input-sm form-control validate[required]" placeholder="..." disabled>
                </div>
                <div class="col-md-6 m-b-15" style="margin-top: 10px;">
                    <label>职业:</label>
                    <input type="text" value=" ${userCheck.profession}" class="input-sm form-control validate[required]" placeholder="..." disabled>
                </div>
                <div class="col-md-6 m-b-15" style="margin-top: 10px;">
                    <label>联系方式:</label>
                    <input type="text" value=" ${userCheck.mobile}" class="input-sm form-control validate[required]" placeholder="..." disabled>
                </div>
                <div class="col-md-6 m-b-15" style="margin-top: 10px;">
                    <label>状态:</label>
                    <input type="text" id="status" value="<c:if test="${userCheck.status eq 0}">待审核</c:if><c:if test="${userCheck.status eq 2}">审核失败</c:if><c:if test="${userCheck.status eq 1}">审核通过</c:if>" class="input-sm form-control validate[required]" placeholder="..." disabled>
                </div>
                <div class="col-md-6 m-b-15" style="margin-top: 10px;">
                    <label>个人简介:</label>
                    <textarea cols="40" rows="6" class="form-control" placeholder="..." disabled="">${userCheck.description}</textarea>
                </div>
                <div class="col-md-6 m-b-15" style="margin-top: 10px;">
                    <label>认证原因:</label>
                    <textarea cols="40" rows="6" class="form-control" placeholder="..." disabled="">${userCheck.reasonContent}</textarea>
                </div>
            </div>
        </div>
    </section>
</section>
<!-- JS -->
<%@ include file="../inc/new/foot.jsp" %>
</body>
<script type="text/javascript">
    function changeStatus(id, status) {
        $leoman.ajax("${contextPath}/admin/user/changeCheckStatus", {
            "id": id,
            "status": status
        }, function (result) {
            if (result == 1) {
                $common.fn.notify("操作成功", "success");
                $('#checkYes').css('display', 'none');
                $('#checkNo').css('display', 'none');
                if (status == 1) {
                    $('#status').val('审核通过');
                } else {
                    $('#status').val('审核失败');
                }
            } else {
                $common.fn.notify("操作失败", "error");
            }
        });
    }
</script>
</html>

